/*
 * @Author: linweizeng 2630208719@qq.com
 * @Date: 2025-02-07 10:16:21
 * @LastEditors: linweizeng 2630208719@qq.com
 * @LastEditTime: 2025-02-10 10:40:18
 * @FilePath: \forum\src\main.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import './index.css'
import './style.css'
import App from './App.vue'
import router from '@/router/index'
import { createPinia } from 'pinia'
import piniaPluginPersistedState from 'pinia-plugin-persistedstate' // pinia数据持久化
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import 'element-plus/theme-chalk/dark/css-vars.css'
import { lazyPlugin,lazyVideo,videoThumbnail } from '@/directives/index'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

const pinia = createPinia()
pinia.use(piniaPluginPersistedState)

app.use(router)
app.use(pinia)
app.use(ElementPlus, { size: 'small', zIndex: 3000,locale: zhCn })
app.use(lazyPlugin)
app.use(lazyVideo)
app.use(videoThumbnail)
app.mount('#app')

